
# 1. Copy Input file from source to binary dir
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/a.yaml
               ${CMAKE_CURRENT_BINARY_DIR}/a.yaml COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/b.yaml
               ${CMAKE_CURRENT_BINARY_DIR}/b.yaml COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/bgen.yaml
               ${CMAKE_CURRENT_BINARY_DIR}/bgen.yaml COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/bexodus.yaml
               ${CMAKE_CURRENT_BINARY_DIR}/bexodus.yaml COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/c.yaml
               ${CMAKE_CURRENT_BINARY_DIR}/c.yaml COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/d.yaml
               ${CMAKE_CURRENT_BINARY_DIR}/d.yaml COPYONLY)

# 2. Name the test with the directory name
get_filename_component(testName ${CMAKE_CURRENT_SOURCE_DIR} NAME)

# 3. Create the test with this name and standard executable
add_test(NAME ${testName}_a  COMMAND ${CMAKE_BINARY_DIR}/siyuan --i=a.yaml)
add_test(NAME ${testName}_b  COMMAND ${CMAKE_BINARY_DIR}/siyuan --i=b.yaml)
add_test(NAME ${testName}_bgen  COMMAND ${CMAKE_BINARY_DIR}/siyuan --i=bgen.yaml)
add_test(NAME ${testName}_bexodus  COMMAND ${CMAKE_BINARY_DIR}/siyuan --i=bexodus.yaml)
add_test(NAME ${testName}_c  COMMAND ${CMAKE_BINARY_DIR}/siyuan --i=c.yaml)
add_test(NAME ${testName}_d  COMMAND ${CMAKE_BINARY_DIR}/siyuan --i=d.yaml)
